library(readr)
library(tidyverse)
── Attaching packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
✓ ggplot2 3.3.2     ✓ purrr   0.3.4
✓ tibble  3.0.1     ✓ dplyr   1.0.0
✓ tidyr   1.1.0     ✓ stringr 1.4.0
✓ readr   1.3.1     ✓ forcats 0.5.0
package ‘ggplot2’ was built under R version 3.6.2package ‘tibble’ was built under R version 3.6.2package ‘tidyr’ was built under R version 3.6.2package ‘purrr’ was built under R version 3.6.2package ‘dplyr’ was built under R version 3.6.2── Conflicts ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x dplyr::filter() masks stats::filter()
x dplyr::lag()    masks stats::lag()
library(dplyr)
library(janitor)
package ‘janitor’ was built under R version 3.6.2
Attaching package: ‘janitor’

The following objects are masked from ‘package:stats’:

    chisq.test, fisher.test
install.packages("here")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/here_0.1.tgz'
Content type 'application/x-gzip' length 18187 bytes (17 KB)
==================================================
downloaded 17 KB

The downloaded binary packages are in
    /var/folders/8t/s1y_vz7x589_hpgh_gmsk1vr0000gn/T//RtmpzAhb7T/downloaded_packages
install.packages("readxl")
Error in install.packages : Updating loaded packages
install.packages("readxl")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/readxl_1.3.1.tgz'
Content type 'application/x-gzip' length 1646895 bytes (1.6 MB)
==================================================
downloaded 1.6 MB

The downloaded binary packages are in
    /var/folders/8t/s1y_vz7x589_hpgh_gmsk1vr0000gn/T//Rtmp5coUL4/downloaded_packages
library(readxl)

Task 4 - Decathlon Data

candy_2015 <- read_excel("boing-boing-candy-2015.xlsx")
candy_2015
NA
head(candy_2015)
dim(candy_2015)
[1] 5630  124
names(dim(candy_2015))
NULL
names(candy_2015)
  [1] "Timestamp"                                                                                                        
  [2] "How old are you?"                                                                                                 
  [3] "Are you going actually going trick or treating yourself?"                                                         
  [4] "[Butterfinger]"                                                                                                   
  [5] "[100 Grand Bar]"                                                                                                  
  [6] "[Anonymous brown globs that come in black and orange wrappers]"                                                   
  [7] "[Any full-sized candy bar]"                                                                                       
  [8] "[Black Jacks]"                                                                                                    
  [9] "[Bonkers]"                                                                                                        
 [10] "[Bottle Caps]"                                                                                                    
 [11] "[Box’o’ Raisins]"                                                                                                 
 [12] "[Brach products (not including candy corn)]"                                                                      
 [13] "[Bubble Gum]"                                                                                                     
 [14] "[Cadbury Creme Eggs]"                                                                                             
 [15] "[Candy Corn]"                                                                                                     
 [16] "[Vials of pure high fructose corn syrup, for main-lining into your vein]"                                         
 [17] "[Candy that is clearly just the stuff given out for free at restaurants]"                                         
 [18] "[Cash, or other forms of legal tender]"                                                                           
 [19] "[Chiclets]"                                                                                                       
 [20] "[Caramellos]"                                                                                                     
 [21] "[Snickers]"                                                                                                       
 [22] "[Dark Chocolate Hershey]"                                                                                         
 [23] "[Dental paraphenalia]"                                                                                            
 [24] "[Dots]"                                                                                                           
 [25] "[Fuzzy Peaches]"                                                                                                  
 [26] "[Generic Brand Acetaminophen]"                                                                                    
 [27] "[Glow sticks]"                                                                                                    
 [28] "[Broken glow stick]"                                                                                              
 [29] "[Goo Goo Clusters]"                                                                                               
 [30] "[Good N' Plenty]"                                                                                                 
 [31] "[Gum from baseball cards]"                                                                                        
 [32] "[Gummy Bears straight up]"                                                                                        
 [33] "[Creepy Religious comics/Chick Tracts]"                                                                           
 [34] "[Healthy Fruit]"                                                                                                  
 [35] "[Heath Bar]"                                                                                                      
 [36] "[Hershey’s Kissables]"                                                                                            
 [37] "[Hershey’s Milk Chocolate]"                                                                                       
 [38] "[Hugs (actual physical hugs)]"                                                                                    
 [39] "[Jolly Rancher (bad flavor)]"                                                                                     
 [40] "[Jolly Ranchers (good flavor)]"                                                                                   
 [41] "[Kale smoothie]"                                                                                                  
 [42] "[Kinder Happy Hippo]"                                                                                             
 [43] "[Kit Kat]"                                                                                                        
 [44] "[Hard Candy]"                                                                                                     
 [45] "[Lapel Pins]"                                                                                                     
 [46] "[LemonHeads]"                                                                                                     
 [47] "[Licorice]"                                                                                                       
 [48] "[Licorice (not black)]"                                                                                           
 [49] "[Lindt Truffle]"                                                                                                  
 [50] "[Lollipops]"                                                                                                      
 [51] "[Mars]"                                                                                                           
 [52] "[Mary Janes]"                                                                                                     
 [53] "[Maynards]"                                                                                                       
 [54] "[Milk Duds]"                                                                                                      
 [55] "[LaffyTaffy]"                                                                                                     
 [56] "[Minibags of chips]"                                                                                              
 [57] "[JoyJoy (Mit Iodine)]"                                                                                            
 [58] "[Reggie Jackson Bar]"                                                                                             
 [59] "[Pixy Stix]"                                                                                                      
 [60] "[Nerds]"                                                                                                          
 [61] "[Nestle Crunch]"                                                                                                  
 [62] "[Now'n'Laters]"                                                                                                   
 [63] "[Pencils]"                                                                                                        
 [64] "[Milky Way]"                                                                                                      
 [65] "[Reese’s Peanut Butter Cups]"                                                                                     
 [66] "[Tolberone something or other]"                                                                                   
 [67] "[Runts]"                                                                                                          
 [68] "[Junior Mints]"                                                                                                   
 [69] "[Senior Mints]"                                                                                                   
 [70] "[Mint Kisses]"                                                                                                    
 [71] "[Mint Juleps]"                                                                                                    
 [72] "[Mint Leaves]"                                                                                                    
 [73] "[Peanut M&M’s]"                                                                                                   
 [74] "[Regular M&Ms]"                                                                                                   
 [75] "[Mint M&Ms]"                                                                                                      
 [76] "[Ribbon candy]"                                                                                                   
 [77] "[Rolos]"                                                                                                          
 [78] "[Skittles]"                                                                                                       
 [79] "[Smarties (American)]"                                                                                            
 [80] "[Smarties (Commonwealth)]"                                                                                        
 [81] "[Chick-o-Sticks (we don’t know what that is)]"                                                                    
 [82] "[Spotted Dick]"                                                                                                   
 [83] "[Starburst]"                                                                                                      
 [84] "[Swedish Fish]"                                                                                                   
 [85] "[Sweetums]"                                                                                                       
 [86] "[Those odd marshmallow circus peanut things]"                                                                     
 [87] "[Three Musketeers]"                                                                                               
 [88] "[Peterson Brand Sidewalk Chalk]"                                                                                  
 [89] "[Peanut Butter Bars]"                                                                                             
 [90] "[Peanut Butter Jars]"                                                                                             
 [91] "[Trail Mix]"                                                                                                      
 [92] "[Twix]"                                                                                                           
 [93] "[Vicodin]"                                                                                                        
 [94] "[White Bread]"                                                                                                    
 [95] "[Whole Wheat anything]"                                                                                           
 [96] "[York Peppermint Patties]"                                                                                        
 [97] "Please leave any remarks or comments regarding your choices."                                                     
 [98] "Please list any items not included above that give you JOY."                                                      
 [99] "Please list any items not included above that give you DESPAIR."                                                  
[100] "Guess the number of mints in my hand."                                                                            
[101] "Betty or Veronica?"                                                                                               
[102] "Check all that apply: \"I cried tears of sadness at the end of  ____________\""                                   
[103] "\"That dress* that went viral early this year - when I first saw it, it was ________\""                           
[104] "Fill in the blank: \"Taylor Swift is a force for ___________\""                                                   
[105] "What is your favourite font?"                                                                                     
[106] "If you squint really hard, the words \"Intelligent Design\" would look like."                                     
[107] "Fill in the blank: \"Imitation is a form of ____________\""                                                       
[108] "Please estimate the degree(s) of separation you have from the following celebrities [JK Rowling]"                 
[109] "Please estimate the degree(s) of separation you have from the following celebrities [JJ Abrams]"                  
[110] "Please estimate the degree(s) of separation you have from the following celebrities [Beyoncé]"                    
[111] "Please estimate the degree(s) of separation you have from the following celebrities [Bieber]"                     
[112] "Please estimate the degree(s) of separation you have from the following celebrities [Kevin Bacon]"                
[113] "Please estimate the degree(s) of separation you have from the following celebrities [Francis Bacon (1561 - 1626)]"
[114] "[Sea-salt flavored stuff, probably chocolate, since this is the \"it\" flavor of the year]"                       
[115] "[Necco Wafers]"                                                                                                   
[116] "Which day do you prefer, Friday or Sunday?"                                                                       
[117] "Please estimate the degrees of separation you have from the following folks [Bruce Lee]"                          
[118] "Please estimate the degrees of separation you have from the following folks [JK Rowling]"                         
[119] "Please estimate the degrees of separation you have from the following folks [Malala Yousafzai]"                   
[120] "Please estimate the degrees of separation you have from the following folks [Thom Yorke]"                         
[121] "Please estimate the degrees of separation you have from the following folks [JJ Abrams]"                          
[122] "Please estimate the degrees of separation you have from the following folks [Hillary Clinton]"                    
[123] "Please estimate the degrees of separation you have from the following folks [Donald Trump]"                       
[124] "Please estimate the degrees of separation you have from the following folks [Beyoncé Knowles]"                    
view(candy_2015)
candy_2016 <- read_excel("boing-boing-candy-2016.xlsx")
candy_2016
candy_2017 <- read_excel("boing-boing-candy-2017.xlsx")
New names:
* `` -> ...114
candy_2017

select and clean columns by position

candy_2015_clean <- candy_2015 %>%
select(c(2:96))
candy_2016_clean <- candy_2016 %>%
select(c(2:5,7:106))
candy_2017_clean <- candy_2017 %>%
select(c(2:5,7:109))

clean the column names

candy_2015_clean <- clean_names(candy_2015_clean)
candy_2016_clean <- clean_names(candy_2016_clean)
candy_2017_clean <- clean_names(candy_2017_clean)

check data

#glimpse(candy_2015_clean)
#glimpse(candy_2016_clean)
#glimpse(candy_2017_clean)

#Data type
typeof(candy_2015_clean)
[1] "list"
typeof(candy_2016_clean)
[1] "list"
typeof(candy_2017_clean)
[1] "list"

Year column cleaned

candy_2015_clean$year = "2015"
candy_2016_clean$year = "2016"
candy_2017_clean$year = "2017"

Missing columns in 2015 with no values

candy_2015_clean$country = ''
candy_2015_clean$gender = ''

Reorder 2015 columns

candy_2015_clean_reordered <- candy_2015_clean[, c(2, 98, 1, 97, 3:96)]
#view(candy_2015_clean_reordered)

#View cleaned data

view(candy_2015_clean_reordered)
view(candy_2016_clean)
view(candy_2017_clean)
dim(candy_2015_clean_reordered)
[1] 5630   98
dim(candy_2016_clean)
[1] 1259  105
dim(candy_2017_clean)
[1] 2460  108

pivot long on 3 data

candy_2015_clean_long <- pivot_longer(data = candy_2015_clean_reordered[,1:98],
cols = 5:97,
names_to = "column_candy",
values_to = "value")
candy_2016_clean_long <- pivot_longer(data = candy_2016_clean[,1:105],
cols = 5:104,
names_to = "column_candy",
values_to = "value")
candy_2017_clean_long <- pivot_longer(data = candy_2017_clean[,1:108],
cols = 5:107,
names_to = "column_candy",
values_to = "value")
view(candy_2015_clean_long)
view(candy_2016_clean_long)
view(candy_2017_clean_long)

Column names. Put 2015, 2016, 2017 datasets into the same order with the same column names

#2015

colnames(candy_2015_clean_long)[1] <- "trick_or_treat"
colnames(candy_2015_clean_long)[2] <- "gender"
colnames(candy_2015_clean_long)[3] <- "age"
colnames(candy_2015_clean_long)[4] <- "country"
colnames(candy_2015_clean_long)[5] <- "year"
colnames(candy_2015_clean_long)[6] <- "candy"
colnames(candy_2015_clean_long)[7] <- "rating"

#2016

colnames(candy_2016_clean_long)[1] <- "trick_or_treat"
colnames(candy_2016_clean_long)[2] <- "gender"
colnames(candy_2016_clean_long)[3] <- "age"
colnames(candy_2016_clean_long)[4] <- "country"
colnames(candy_2016_clean_long)[5] <- "year"
colnames(candy_2016_clean_long)[6] <- "candy"
colnames(candy_2016_clean_long)[7] <- "rating"

#2017

colnames(candy_2017_clean_long)[1] <- "trick_or_treat"
colnames(candy_2017_clean_long)[2] <- "gender"
colnames(candy_2017_clean_long)[3] <- "age"
colnames(candy_2017_clean_long)[4] <- "country"
colnames(candy_2017_clean_long)[5] <- "year"
colnames(candy_2017_clean_long)[6] <- "candy"
colnames(candy_2017_clean_long)[7] <- "rating"

Join all 2015, 2016, 2017 into 1 dataset

candy_all_years_clean <- rbind(candy_2015_clean_long,
                               candy_2016_clean_long,
                               candy_2017_clean_long)
view(candy_all_years_clean)

#country clean up #USA

candy_all_years_country <- candy_all_years_clean %>%
  mutate(candy_all_years_clean =
  str_replace_all(candy_all_years_clean, "united states of america", "usa") %>%
  str_replace_all(candy_all_years_clean, "united states", "usa") %>% 
  str_replace_all(candy_all_years_clean, "america", "usa") %>%
        )
  
  

#Canada

#UK

save the cleaned and combined dataset into a new file

write_rds(candy_all_years_clean, here::here("candy_all_years_clean.rds"))
LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CmxpYnJhcnkocmVhZHIpCmBgYAoKYGBge3J9CmxpYnJhcnkodGlkeXZlcnNlKQpg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